import Mock from 'mockjs'

const orders =[
  {
    id:'0',
    order_type:"A",  //套餐编码
    order_name:"基础套餐1",  //套餐名称
    price:123,          //价格
    auths:[1,2,3,4,5,6],       //权限列表
    describe:"这里是基础套餐的描述，描述是干啥用的，我也不知道"     //描述
  },
  {
    id:'1',
    order_type:"B",  //套餐编码
    order_name:"基础套餐2",  //套餐名称
    price:123,          //价格
    auths:[1,2,3,4,5,6],       //权限列表
    describe:"这里是基础套餐的描述，描述是干啥用的，我也不知道"     //描述
  },
  {
    id:'2',
    order_type:"C",  //套餐编码
    order_name:"基础套餐3",  //套餐名称
    price:123,          //价格
    auths:[1,2,3,4,5,6],       //权限列表
    describe:"这里是基础套餐的描述，描述是干啥用的，我也不知道"     //描述
  },
  {
    id:'3',
    order_type:"D",  //套餐编码
    order_name:"基础套餐4",  //套餐名称
    price:123,          //价格
    auths:[1,2,3,4,5,6],       //权限列表
    describe:"这里是基础套餐的描述，描述是干啥用的，我也不知道"     //描述
  },{
    id:'4',
    order_type:"E",  //套餐编码
    order_name:"基础套餐5",  //套餐名称
    price:123,          //价格
    auths:[1,2,3,4,5,6],       //权限列表
    describe:"这里是基础套餐的描述，描述是干啥用的，我也不知道"     //描述
  },
]

const consumers=[
  {
    id: '1',
    account:'aaaaaaa',
    passwd:'aaa',
    role:'去瞧瞧',
    realname: 'aaaa',
    tel:'11111111111',
    organize:'啊啊',
    alive:'1',
    routes: []
  },
  {
    id: '2',
    account:'bbbbbbbb',
    passwd:'bbbbb',
    role:'打框架里',
    realname: 'ddd',
    tel:'33333333333',
    alive:'1',
    organize:'阿大声道',
    routes: []
  }
]

const grades_sys=[

  {id:0,label:'一年级',kcode:'GL001',desc:'',type:'grade',field:'STA001'},
  {id:1,label:'二年级',kcode:'GL002',desc:'',type:'grade',field:'STA001'},
  {id:2,label:'三年级',kcode:'GL003',desc:'',type:'grade',field:'STA001'},
  {id:3,label:'四年级',kcode:'GL004',desc:'',type:'grade',field:'STA001'},
  {id:4,label:'五年级',kcode:'GL005',desc:'',type:'grade',field:'STA001'},
  {id:5,label:'六年级',kcode:'GL006',desc:'',type:'grade',field:'STA001'},
  {id:6,label:'初一',kcode:'GL007',desc:'',type:'grade',field:'STA002'},
  {id:7,label:'初二',kcode:'GL008',desc:'',type:'grade',field:'STA002'},
  {id:8,label:'初三',kcode:'GL009',desc:'',type:'grade',field:'STA002'},
  {id:9,label:'高一',kcode:'GL010',desc:'',type:'grade',field:'STA003'},
  {id:10,label:'高二',kcode:'GL011',desc:'',type:'grade',field:'STA003'},
  {id:11,label:'高三',kcode:'GL012',desc:'',type:'grade',field:'STA003'},

]
const stages=[
  {id:1,label:'小学',kcode:'STA001',desc:'',type:'stage'},
  {id:2,label:'初中',kcode:'STA002',desc:'',type:'stage'},
  {id:3,label:'高中',kcode:'STA003',desc:'',type:'stage'},

]

export default [
  {
    url: '/vue-admin-template/orders',
    type: 'get',
    response: _ => {
      return {
        code: 20000,
        data: orders
      }
    }
  },

  {
    url: '/vue-admin-template/orders',
    type: 'post',
    response: _ => {
      return {
        code: 20000,
        data: {
          key: Mock.mock('@integer(300, 5000)')
        }
      }
    }
  },
  // update order
  {
    url: '/vue-admin-template/orders/[A-Za-z0-9]',
    type: 'put',
    response: {
      code: 20000,
      data: {
        status: 'success'
      }
    }
  },

  // delete order
  {
    url: '/vue-admin-template/orders/[A-Za-z0-9]',
    type: 'delete',
    response: {
      code: 20000,
      data: {
        status: 'success'
      }
    }
  },


  {
    url: '/vue-admin-template/consumers',
    type: 'get',
    response: _ => {
      return {
        code: 20000,
        data: consumers
      }
    }
  },

  {
    url: '/vue-admin-template/consumer',
    type: 'post',
    response: _ => {
      return {
        code: 20000,
        data: {
          key: Mock.mock('@integer(300, 5000)')
        }
      }
    }
  },
  // update order
  {
    url: '/vue-admin-template/consumer/[A-Za-z0-9]',
    type: 'put',
    response: {
      code: 20000,
      data: {
        status: 'success'
      }
    }
  },

  // delete order
  {
    url: '/vue-admin-template/consumer/[A-Za-z0-9]',
    type: 'delete',
    response: {
      code: 20000,
      data: {
        status: 'success'
      }
    }
  },


//=====年级创建============

  {
    url: '/vue-admin-template/gradesSys',
    type: 'get',
    response: _ => {
      return {
        code: 20000,
        data: grades_sys
      }
    }
  },

  {
    url: '/vue-admin-template/gradeSys',
    type: 'post',
    response: _ => {
      return {
        code: 20000,
        data: {
          key: Mock.mock('@integer(300, 5000)'),
          kcode: Mock.mock('@integer(300, 5000)')
        }
      }
    }
  },
  // update order
  {
    url: '/vue-admin-template/gradeSys/[A-Za-z0-9]',
    type: 'put',
    response: {
      code: 20000,
      data: {
        status: 'success'
      }
    }
  },

  // delete order
  {
    url: '/vue-admin-template/gradeSys/[A-Za-z0-9]',
    type: 'delete',
    response: {
      code: 20000,
      data: {
        status: 'success'
      }
    }
  },

//===========学段创建==========
  {
    url: '/vue-admin-template/stages',
    type: 'get',
    response: _ => {
      return {
        code: 20000,
        data: stages
      }
    }
  },

  {
    url: '/vue-admin-template/stage',
    type: 'post',
    response: _ => {
      return {
        code: 20000,
        data: {
          key: Mock.mock('@integer(300, 5000)'),
          // kcode: Mock.mock('@integer(300, 5000)')
        }
      }
    }
  },
  // update order
  {
    url: '/vue-admin-template/stage/[A-Za-z0-9]',
    type: 'put',
    response: {
      code: 20000,
      data: {
        status: 'success'
      }
    }
  },

  // delete order
  {
    url: '/vue-admin-template/stage/[A-Za-z0-9]',
    type: 'delete',
    response: {
      code: 20000,
      data: {
        status: 'success'
      }
    }
  }

]
